<template>
  <div class="like-page">
      <van-list
  v-model="loading"
  :finished="finished"
  finished-text="没有更多了"
  @load="onLoad"
>
<ArticleItem :i='i' v-for="i in arr" :key="i.id"></ArticleItem>

</van-list>
  </div>
</template>

<script>
import { list } from '@/api/Like'
export default {
  name: 'LikePage',
  data () {
    return {
      arr: [],
      loading: false,
      finished: false,
      current: 1,
      sorter: 'weight_desc',
      optType: 2,
      pageSize: 100,
      page: 1,
      total: 1
    }
  },
  methods: {
    async onLoad () {
      const res = await list({
        optType: this.optType,
        pageSize: this.pageSize,
        page: this.page
      })
      console.log(res.data.data)

      this.arr.push(...res.data.data.rows)
      this.finished = true
      this.loading = false
    }
  }
}
</script>

<style lang="less" scoped>

</style>
